Passport Verification API
API Description
Objective
The Passport Verification API authenticates a user by verifying their identity details against a centralized database of passport records.
| Input | Output |
|---|---|
| The name and the passport details of the customer. | The outcome of comparing the input details with the information retrieved from the matching passport record. |
API URL
https://ind-verify.hyperverge.co/api/verifyPassport
Overview
The API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should upload all images and files as form-data through a POST request.
Authentication
You need a unique pair of application ID ( appId ) and application key (appKey) from HyperVerge to verify your identity for accessing the API.
API Request Details
Method - POST
Headers
| Parameter | Mandatory or Optional | Type | Description | Valid Values |
|---|---|---|---|---|
content-type | Mandatory | string | This parameter defines the media type for the request payload. | application/json |
appId | Mandatory | string | The application ID shared by HyperVerge | Not Applicable - this is a unique value. |
appKey | Mandatory | string | The application key shared by HyperVerge | Not Applicable - this is a unique value. |
transactionId | Mandatory | string | The unique ID for the customer journey. | Not Applicable - this is a unique value related to a transaction in your application. |
Input
The following table provides the complete information on the parameters used in the request body for the API call.
| Parameter | Mandatory or Optional | Type | Description |
|---|---|---|---|
fileNo | Mandatory | string | The passport reference file number. |
dob | Mandatory | string | The date of birth of the customer. |
doi | Mandatory | string | The date of issue of the passport. |
passportNo | Mandatory | string | The passport number of the customer. |
name | Mandatory | string | The name of the customer. |
Sample Request
The following code shows a standard curl request for the API.
curl --location --request POST 'https://ind-verify.hyperverge.co/api/verifyPassport' \
--header 'Content-Type: application/json' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_HyperVerge_transactionID>' \
--data '{
"fileNo": "<passport_reference_file_number>",
"dob": "<Date_of_Birth>",
"doi": "<Date_of_issue>",
"passportNo": "<Passport_Number>",
"name": "<Name_on_Passport>"
}'
Success Response Sample
The following is a sample success response.
{
"status": "success",
"statusCode": "200",
"result": {
"applicationDate": "10/10/1000",
"dateOfIssue": {
"dispatchedOnFromSource": "10/10/1000",
"dateOfIssueMatch": true
},
"passportNumber": {
"passportNumberFromSource": "12345678",
"passportNumberMatch": true
},
"name": {
"nameMatch": true,
"surnameFromPassport": "SAMPLE",
"nameScore": 1,
"nameFromPassport": "SAMPLE SAMPLE"
},
"typeOfApplication": "SAMPLE"
}
}
Failure Response Sample
The following is a sample response when no matching record is found against the input parameters.
{
"status": "failure",
"statusCode": "422",
"error": "Entered id is not found in any database"
}
Error Response Sample
The following are the sample error responses for the API.
- Missing File Number
- Missing Passport Number
- Missing Date of Birth
- Invalid Input for Date of Birth
{
"status": "failure",
"statusCode": "400"
"error": "fileNo is not allowed to be empty"
}
{
"status": "failure",
"statusCode": "400",
"error": "passportNo is not allowed to be empty"
}
{
"status": "failure",
"statusCode": "400",
"error": "dob is required"
}
{
"status": "failure",
"statusCode": "400",
"error": "dob must be a number of milliseconds or valid date string"
}
- Server Error
- Service Unavailable
{
"status": "failure",
"statusCode": "500",
"error": "Unexpected Server Error"
}
{
"status": "failure",
"statusCode": "504",
"error": "Govt. database service unavailable"
}
Error Response Details
failure status with a relevant status code and error message.
The following table lists all error responses. | Status Code | Error Message | Error Description |
|---|---|---|
| 400 | fileNo is not allowed to be empty | The fileNo in the request contains no value. |
| 400 | passportNo is not allowed to be empty | The passportNo is a mandatory input in the request. |
| 400 | dob is required | The dob parameter is a mandatory input in the request. |
| 400 | fileNo is required | The fileNo is a mandatory input in the request. |
| 400 | dob must be a number of milliseconds or valid date string | |
| 500 | Unexpected Server Error | There is an issue with the service. Kindly contact the HyperVerge Team for support. |
| 504 | Govt. database service unavailable | The service is currently unavailable. Kindly retry the request in some time. |